const data = require('../二叉树/row-data/treeData')
// const data1 = require('../二叉树/row-data/treeData')
// console.log(data)
const res = merge(data, data)
console.log(res)

function merge(L, R) {
    if (!L && !R) return null

    if (!L) return R
    if (!R) return L

    L.value = L.value + R.value
    L.left = merge(L.left, R.left)
    R.left = merge(L.right, R.right)
    return L
}
